<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + request.getContextPath() + "/";
%>

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
	<base href="<%=basePath%>">
<link href="jquery/bootstrap_3.3.0/css/bootstrap.min.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="jquery/jquery-1.11.1-min.js"></script>
<script type="text/javascript" src="jquery/bootstrap_3.3.0/js/bootstrap.min.js"></script>

<script type="text/javascript">

	//默认情况下取消和保存按钮是隐藏的
	var cancelAndSaveBtnDefault = true;
	
	$(function(){
		$("#remark").focus(function(){
			if(cancelAndSaveBtnDefault){
				//设置remarkDiv的高度为130px
				$("#remarkDiv").css("height","130px");
				//显示
				$("#cancelAndSaveBtn").show("2000");
				cancelAndSaveBtnDefault = false;
			}
		});
		
		$("#cancelBtn").click(function(){
			//显示
			$("#cancelAndSaveBtn").hide();
			//设置remarkDiv的高度为130px
			$("#remarkDiv").css("height","90px");
			cancelAndSaveBtnDefault = true;
		});

		$('#clueRemarkDiv').on('mouseover','.remarkDiv',function () {
			$(this).children("div").children("div").show();
		});

		$('#clueRemarkDiv').on('mouseout','.remarkDiv',function () {
			$(this).children("div").children("div").hide();
		});

		$('#clueRemarkDiv').on('mouseover','.myHref',function () {
			$(this).children("span").css("color","red");
		});

		$('#clueRemarkDiv').on('mouseout','.myHref',function(){
			$(this).children("span").css("color","#E6E6E6");
		});
		
		/*$(".remarkDiv").mouseover(function(){
			$(this).children("div").children("div").show();
		});
		
		$(".remarkDiv").mouseout(function(){
			$(this).children("div").children("div").hide();
		});
		
		$(".myHref").mouseover(function(){
			$(this).children("span").css("color","red");
		});
		
		$(".myHref").mouseout(function(){
			$(this).children("span").css("color","#E6E6E6");
		});*/

		$('#saveCreateClueRemarkBtn').click(function () {
			var remark = $('#remark').val();
			var clueId = $('#clueId').val();
			if(remark==null||remark==''){
				alert('备注不能为空');
				return;
			}

			$.ajax({
				url:'workbench/clue/saveCreateClueRamark.do',
				data:{
					remark:remark,
					clueId:clueId
				},
				dataType:'json',
				type:'post',
				success:function (res) {
					if(res.code=='0'){
						alert(res.message);
					}else if(res.code=='1'){
						//DOM插入
						$('#remark').val('');

						var htmlStr = '';

						var fullname = $('#fullname').html();
						var company = $('#company').html();

						htmlStr += '<div class="remarkDiv" id="div_' + res.retData.id + '" style="height: 60px;">';
						htmlStr += '<img title="' + res.retData.createBy + '" src="image/user-thumbnail.png" style="width: 30px; height:30px;">';
						htmlStr += '<div style="position: relative; top: -40px; left: 40px;" >';
						htmlStr += '<h5 id="h5_' + res.retData.id + '">' + res.retData.noteContent + '</h5>';
						var time = res.retData.editFlag=='1'?res.retData.editTime:res.retData.createTime;
						var by = res.retData.editFlag=='1'?res.retData.editBy:res.retData.createBy;
						htmlStr += '<font color="gray">线索</font> <font color="gray">-</font> <b>' + fullname + '-' + company + '</b> <small style="color: gray;" id="small_' + res.retData.id + '">'+ time + ' 由' + by + '</small>';
						htmlStr += '<div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">';
						htmlStr += '<a class="myHref" name="editA" remarkId="' + res.retData.id + '" href="javascript:void(0);"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #e6e6e6;"></span></a>';
						htmlStr += '&nbsp;&nbsp;&nbsp;&nbsp;';
						htmlStr += '<a class="myHref" name="deleteA" remarkId="' + res.retData.id + '" href="javascript:void(0);"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #E6E6E6;"></span></a>';
						htmlStr += '</div>';
						htmlStr += '</div>';
						htmlStr += '</div>';

						if($('#clueRemarkDiv .remarkDiv').size()==0){
							$('#clueRemarkDiv').append(htmlStr);
						}else{
							$('#clueRemarkDiv .remarkDiv').eq(0).before(htmlStr);
						}
					}
				}
			});
		});

		$('#clueRemarkDiv').on('click','a[name="deleteA"]',function (){
			if(confirm('您确定要删除吗?')){
				var remarkId = $(this).attr('remarkId');

				$.ajax({
					url:'workbench/clue/deleteClueRemarkById.do',
					data:{
						remarkId:remarkId
					},
					dataType:'json',
					type:'post',
					success:function (res) {
						if(res.code=='0'){
							alert(res.message);
						}else if(res.code=='1'){
							//删除
							$('#div_'+remarkId).remove();
						}
					}
				});
			}
		});

		$('#clueRemarkDiv').on('click','a[name="editA"]',function (){
			var remarkId = $(this).attr('remarkId');

			var remark = $('#h5_'+remarkId).html();

			$('#noteContent').val(remark);

			$('#clueRemarkId').val(remarkId);

			$('#editRemarkModal').modal('show');
		});

		$('#updateRemarkBtn').click(function () {
			var remarkId = $('#clueRemarkId').val();
			var remark = $('#noteContent').val();

			if(remark==null||remark==''){
				alert('备注内容不能为空');
				return;
			}

			$.ajax({
				url:'workbench/clue/updateClueRemarkById.do',
				data:{
					remarkId:remarkId,
					remark:remark
				},
				dataType:'json',
				type:'post',
				success:function (res) {
					if(res.code=='0'){
						alert(res.message);
					}else if(res.code=='1'){
						//更新
						$('#h5_'+remarkId).html(remark);
						$('#small_'+remarkId).html(res.retData.editTime + ' 由' + res.retData.editBy);
						$('#editRemarkModal').modal('hide');
					}
				}
			});
		});

		queryActivityOfClue();

		$('#showActivityModalBtn').click(function () {
			$.ajax({
				url:'workbench/clue/queryAllActivity.do',
				dataType:'json',
				type:'post',
				success:function (res) {

					$('#activityCheckAll').prop('checked',false);

					$('#activityList').empty();

					var htmlStr = '';

					var activityIds = $('#activitTbody').attr('activityIds');

					$.each(res,function (i,n) {
						if(activityIds==''||activityIds.indexOf(n.id) == -1){
							htmlStr += '<tr>';
							htmlStr += '<td><input type="checkbox" value="' + n.id + '"/></td>';
							htmlStr += '<td>' + n.name + '</td>';
							htmlStr += '<td>' + n.startDate + '</td>';
							htmlStr += '<td>' + n.endDate + '</td>';
							htmlStr += '<td>' + n.owner + '</td>';
							htmlStr += '</tr>';
						}
					});

					$('#activityList').html(htmlStr);

					$('#bundModal').modal('show');
				}
			});
		});

		$('#activityList').on('click','input[type="checkbox"]',function(){
			$('#activityCheckAll').prop('checked',$('#activityList input[type="checkbox"]:checked').size()==$('#activityList input[type="checkbox"]').size()?true:false);
		});

		$('#activityCheckAll').click(function () {
			$('#activityList input[type="checkbox"]').prop('checked',$('#activityCheckAll').prop('checked'));
		});

		$('#bindBtn').click(function () {
			if($('#activityList input[type="checkbox"]:checked').size()==0){
				alert('请选择数据');
				return;
			}

			var clueId = $('#clueId').val();

			var param = '';
			//var activityIds = [];
			$('#activityList input[type="checkbox"]:checked').each(function () {
				param += 'activityIds=' + this.value + '&';
				//activityIds.push(this.value);
			});

			param += 'clueId=' + clueId;

			$.ajax({
				url:'workbench/clue/bindActivityAndClue.do',
				data: param,
				dataType:'json',
				type:'post',
				success:function (res) {
					if(res.code=='0'){
						alert(res.message);
						$('#bundModal').modal('show');
					}else if(res.code=='1'){
						queryActivityOfClue();
						$('#bundModal').modal('hide');
					}
				}
			});
		});

		$('#searchActivityTxt').keyup(function () {
			var activityName = $(this).val();

			$.ajax({
				url:'workbench/clue/queryAllActivityByName.do',
				data:{
					activityName:activityName
				},
				dataType:'json',
				type:'post',
				success:function (res) {

					$('#activityCheckAll').prop('checked',false);

					$('#activityList').empty();

					var htmlStr = '';

					var activityIds = $('#activitTbody').attr('activityIds');

					$.each(res,function (i,n) {
						if(activityIds==''||activityIds.indexOf(n.id) == -1){
							htmlStr += '<tr>';
							htmlStr += '<td><input type="checkbox" value="' + n.id + '"/></td>';
							htmlStr += '<td>' + n.name + '</td>';
							htmlStr += '<td>' + n.startDate + '</td>';
							htmlStr += '<td>' + n.endDate + '</td>';
							htmlStr += '<td>' + n.owner + '</td>';
							htmlStr += '</tr>';
						}
					});

					$('#activityList').html(htmlStr);
				}
			});
		});

		$('#activitTbody').on('click','a[name="relieveA"]',function () {
			if(confirm('您确定要解除关联吗?')){
				var clueId = $('#clueId').val();
				var activityId = $(this).attr('activityId');

				$.ajax({
					url:'workbench/clue/relieveClueActivityRelation.do',
					data:{
						clueId:clueId,
						activityId:activityId
					},
					dataType:'json',
					type:'post',
					success:function (res) {
						if(res.code=='0'){
							alert(res.message);
						}else if(res.code=='1'){
							queryActivityOfClue();
						}
					}
				});
			}
		});

		$('#convertBtn').click(function () {
			var clueId = $('#clueId').val();
			window.location.href='workbench/clue/convert.do?clueId='+clueId;
		});

	});

	function queryActivityOfClue() {
		var clueId = $('#clueId').val();

		$.ajax({
			url:'workbench/clue/queryActivityOfClue.do',
			data:{
				clueId:clueId
			},
			dataType:'json',
			type:'post',
			success:function (res) {

				$('#activitTbody').empty();

				var htmlStr = '';

				var activityIds = '';

				$.each(res,function (i,n) {
					activityIds += n.id + ',';
					htmlStr += '<tr>';
					htmlStr += '<td>' + n.name + '</td>';
					htmlStr += '<td>' + n.startDate + '</td>';
					htmlStr += '<td>' + n.endDate + '</td>';
					htmlStr += '<td>' + n.owner + '</td>';
					htmlStr += '<td><a href="javascript:void(0);" activityId="' + n.id + '" name="relieveA" style="text-decoration: none;"><span class="glyphicon glyphicon-remove"></span>解除关联</a></td>';
					htmlStr += '</tr>';
				});

				activityIds = activityIds.substr(0,activityIds.length-1);

				$('#activitTbody').attr('activityIds',activityIds);

				$('#activitTbody').html(htmlStr);
			}
		});
	}
	
</script>

</head>
<body>

<!-- 修改线索备注的模态窗口 -->
<div class="modal fade" id="editRemarkModal" role="dialog">
	<%-- 备注的id --%>
	<input type="hidden" id="remarkId">
	<div class="modal-dialog" role="document" style="width: 40%;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span>
				</button>
				<h4 class="modal-title" id="myModalLabel">修改备注</h4>
			</div>
			<div class="modal-body">
				<form class="form-horizontal" role="form">
					<div class="form-group">
						<label for="noteContent" class="col-sm-2 control-label">内容</label>
						<div class="col-sm-10" style="width: 81%;">
							<input type="hidden" id="clueRemarkId">
							<textarea class="form-control" rows="3" id="noteContent"></textarea>
						</div>
					</div>
				</form>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				<button type="button" class="btn btn-primary" id="updateRemarkBtn">更新</button>
			</div>
		</div>
	</div>
</div>

	<!-- 关联市场活动的模态窗口 -->
	<div class="modal fade" id="bundModal" role="dialog">
		<div class="modal-dialog" role="document" style="width: 80%;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal">
						<span aria-hidden="true">×</span>
					</button>
					<h4 class="modal-title">关联市场活动</h4>
				</div>
				<div class="modal-body">
					<div class="btn-group" style="position: relative; top: 18%; left: 8px;">
						<form class="form-inline" role="form">
						  <div class="form-group has-feedback">
						    <input type="text" class="form-control" style="width: 300px;" id="searchActivityTxt" placeholder="请输入市场活动名称，支持模糊查询">
						    <span class="glyphicon glyphicon-search form-control-feedback"></span>
						  </div>
						</form>
					</div>
					<table id="activityTable" class="table table-hover" style="width: 900px; position: relative;top: 10px;">
						<thead>
							<tr style="color: #B3B3B3;">
								<td><input type="checkbox" id="activityCheckAll"/></td>
								<td>名称</td>
								<td>开始日期</td>
								<td>结束日期</td>
								<td>所有者</td>
								<td></td>
							</tr>
						</thead>
						<tbody id="activityList">
							<%--<tr>
								<td><input type="checkbox"/></td>
								<td>发传单</td>
								<td>2020-10-10</td>
								<td>2020-10-20</td>
								<td>zhangsan</td>
							</tr>
							<tr>
								<td><input type="checkbox"/></td>
								<td>发传单</td>
								<td>2020-10-10</td>
								<td>2020-10-20</td>
								<td>zhangsan</td>
							</tr>--%>
						</tbody>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
					<button type="button" class="btn btn-primary" id="bindBtn">关联</button>
				</div>
			</div>
		</div>
	</div>


	<!-- 返回按钮 -->
	<div style="position: relative; top: 35px; left: 10px;">
		<a href="javascript:void(0);" onclick="window.history.back();"><span class="glyphicon glyphicon-arrow-left" style="font-size: 20px; color: #DDDDDD"></span></a>
	</div>
	
	<!-- 大标题 -->
	<div style="position: relative; left: 40px; top: -30px;">
		<div class="page-header">
			<h3>${requestScope.clue.fullname}${requestScope.clue.appellation==null?'':requestScope.clue.appellation}<small>${requestScope.clue.company}</small></h3>
		</div>
		<div style="position: relative; height: 50px; width: 500px;  top: -72px; left: 700px;">
			<button type="button" class="btn btn-default" id="convertBtn"><span class="glyphicon glyphicon-retweet"></span> 转换</button>
			
		</div>
	</div>
	
	<br/>
	<br/>
	<br/>

	<!-- 详细信息 -->
	<div style="position: relative; top: -70px;">
		<div style="position: relative; left: 40px; height: 30px;">
			<input type="hidden" id="clueId" value="${requestScope.clue.id}">
			<div style="width: 300px; color: gray;">名称</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b id="fullname">${requestScope.clue.fullname}${requestScope.clue.appellation==null?'':requestScope.clue.appellation}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">所有者</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.owner}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 10px;">
			<div style="width: 300px; color: gray;">公司</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b id="company">${requestScope.clue.company}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">职位</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.job}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 20px;">
			<div style="width: 300px; color: gray;">邮箱</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.email}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">公司座机</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.phone}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 30px;">
			<div style="width: 300px; color: gray;">公司网站</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.website}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">手机</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.mphone}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 40px;">
			<div style="width: 300px; color: gray;">线索状态</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.state}</b></div>
			<div style="width: 300px;position: relative; left: 450px; top: -40px; color: gray;">线索来源</div>
			<div style="width: 300px;position: relative; left: 650px; top: -60px;"><b>${requestScope.clue.source}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px;"></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -60px; left: 450px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 50px;">
			<div style="width: 300px; color: gray;">创建者</div>
			<div style="width: 500px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.createBy}&nbsp;&nbsp;</b><small style="font-size: 10px; color: gray;">${requestScope.clue.createTime}</small></div>
			<div style="height: 1px; width: 550px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 60px;">
			<div style="width: 300px; color: gray;">修改者</div>
			<div style="width: 500px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.editBy}&nbsp;&nbsp;</b><small style="font-size: 10px; color: gray;">${requestScope.clue.editTime}</small></div>
			<div style="height: 1px; width: 550px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 70px;">
			<div style="width: 300px; color: gray;">描述</div>
			<div style="width: 630px;position: relative; left: 200px; top: -20px;">
				<b>
					${requestScope.clue.description}
				</b>
			</div>
			<div style="height: 1px; width: 850px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 80px;">
			<div style="width: 300px; color: gray;">联系纪要</div>
			<div style="width: 630px;position: relative; left: 200px; top: -20px;">
				<b>
					${requestScope.clue.contactSummary}
				</b>
			</div>
			<div style="height: 1px; width: 850px; background: #D5D5D5; position: relative; top: -20px;"></div>
		</div>
		<div style="position: relative; left: 40px; height: 30px; top: 90px;">
			<div style="width: 300px; color: gray;">下次联系时间</div>
			<div style="width: 300px;position: relative; left: 200px; top: -20px;"><b>${requestScope.clue.nextContactTime}</b></div>
			<div style="height: 1px; width: 400px; background: #D5D5D5; position: relative; top: -20px; "></div>
		</div>
        <div style="position: relative; left: 40px; height: 30px; top: 100px;">
            <div style="width: 300px; color: gray;">详细地址</div>
            <div style="width: 630px;position: relative; left: 200px; top: -20px;">
                <b>
                   ${requestScope.clue.address}
                </b>
            </div>
            <div style="height: 1px; width: 850px; background: #D5D5D5; position: relative; top: -20px;"></div>
        </div>
	</div>
	
	<!-- 备注 -->
	<div style="position: relative; top: 40px; left: 40px;">
		<div class="page-header">
			<h4>备注</h4>
		</div>

		<div id="clueRemarkDiv">
			<c:forEach items="${requestScope.clueRemarkList}" var="clueRemark">
				<div class="remarkDiv" id="div_${clueRemark.id}" style="height: 60px;">
					<img title="${clueRemark.createBy}" src="image/user-thumbnail.png" style="width: 30px; height:30px;">
					<div style="position: relative; top: -40px; left: 40px;" >
						<h5 id="h5_${clueRemark.id}">${clueRemark.noteContent}</h5>
						<font color="gray">线索</font> <font color="gray">-</font> <b>${requestScope.clue.fullname}${requestScope.clue.appellation==null?'':requestScope.clue.appellation}-${requestScope.clue.company}</b> <small style="color: gray;" id="small_${clueRemark.id}"> ${clueRemark.editFlag=='1'?clueRemark.editTime:clueRemark.createTime} 由${clueRemark.editFlag=='1'?clueRemark.editBy:clueRemark.createBy}</small>
						<div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">
							<a class="myHref" name="editA" remarkId="${clueRemark.id}" href="javascript:void(0);"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #E6E6E6;"></span></a>
							&nbsp;&nbsp;&nbsp;&nbsp;
							<a class="myHref" name="deleteA" remarkId="${clueRemark.id}" href="javascript:void(0);"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #E6E6E6;"></span></a>
						</div>
					</div>
				</div>
			</c:forEach>
		</div>

		<%--<!-- 备注1 -->
		<div class="remarkDiv" style="height: 60px;">
			<img title="zhangsan" src="image/user-thumbnail.png" style="width: 30px; height:30px;">
			<div style="position: relative; top: -40px; left: 40px;" >
				<h5>哎呦！</h5>
				<font color="gray">线索</font> <font color="gray">-</font> <b>李四先生-动力节点</b> <small style="color: gray;"> 2017-01-22 10:10:10 由zhangsan</small>
				<div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #E6E6E6;"></span></a>
					&nbsp;&nbsp;&nbsp;&nbsp;
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #E6E6E6;"></span></a>
				</div>
			</div>
		</div>
		
		<!-- 备注2 -->
		<div class="remarkDiv" style="height: 60px;">
			<img title="zhangsan" src="image/user-thumbnail.png" style="width: 30px; height:30px;">
			<div style="position: relative; top: -40px; left: 40px;" >
				<h5>呵呵！</h5>
				<font color="gray">线索</font> <font color="gray">-</font> <b>李四先生-动力节点</b> <small style="color: gray;"> 2017-01-22 10:20:10 由zhangsan</small>
				<div style="position: relative; left: 500px; top: -30px; height: 30px; width: 100px; display: none;">
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-edit" style="font-size: 20px; color: #E6E6E6;"></span></a>
					&nbsp;&nbsp;&nbsp;&nbsp;
					<a class="myHref" href="javascript:void(0);"><span class="glyphicon glyphicon-remove" style="font-size: 20px; color: #E6E6E6;"></span></a>
				</div>
			</div>
		</div>--%>
		
		<div id="remarkDiv" style="background-color: #E6E6E6; width: 870px; height: 90px;">
			<form role="form" style="position: relative;top: 10px; left: 10px;">
				<textarea id="remark" class="form-control" style="width: 850px; resize : none;" rows="2"  placeholder="添加备注..."></textarea>
				<p id="cancelAndSaveBtn" style="position: relative;left: 737px; top: 10px; display: none;">
					<button id="cancelBtn" type="button" class="btn btn-default">取消</button>
					<button type="button" class="btn btn-primary" id="saveCreateClueRemarkBtn">保存</button>
				</p>
			</form>
		</div>
	</div>
	
	<!-- 市场活动 -->
	<div>
		<div style="position: relative; top: 60px; left: 40px;">
			<div class="page-header">
				<h4>市场活动</h4>
			</div>
			<div style="position: relative;top: 0px;">
				<table class="table table-hover" style="width: 900px;">
					<thead>
						<tr style="color: #B3B3B3;">
							<td>名称</td>
							<td>开始日期</td>
							<td>结束日期</td>
							<td>所有者</td>
							<td></td>
						</tr>
					</thead>
					<tbody id="activitTbody"  activityIds="">
						<%--<tr>
							<td>发传单</td>
							<td>2020-10-10</td>
							<td>2020-10-20</td>
							<td>zhangsan</td>
							<td><a href="javascript:void(0);"  style="text-decoration: none;"><span class="glyphicon glyphicon-remove"></span>解除关联</a></td>
						</tr>
						<tr>
							<td>发传单</td>
							<td>2020-10-10</td>
							<td>2020-10-20</td>
							<td>zhangsan</td>
							<td><a href="javascript:void(0);"  style="text-decoration: none;"><span class="glyphicon glyphicon-remove"></span>解除关联</a></td>
						</tr>--%>
					</tbody>
				</table>
			</div>
			
			<div>
				<a href="javascript:void(0);" id="showActivityModalBtn" style="text-decoration: none;"><span class="glyphicon glyphicon-plus"></span>关联市场活动</a>
			</div>
		</div>
	</div>
	
	
	<div style="height: 200px;"></div>
</body>
</html>